<?php
header("Content-type: text/html; charset=iso-8859-1");
include("../library/php/config.inc.php");
include("../library/php/constant.inc.php");
include("../library/php/db.inc.php");
include("../library/php/db.lib.php");
include("../library/php/library.inc.php");
include("../library/php/templates_admin.inc.php");

include("../library/php/function.inc.php");
include("../library/php/includes/functions/general.php");
include("../library/php/html_output.php");
require('../library/php/includes/functions/password_funcs.php');
include("../library/php/class_danhba.php");
include("../library/php/class_menu.php");
include("../library/php/class_counter.php");
include ("../library/php/class_tintuc.php");
include ("../library/php/class_danhba_cat.php");
include ("../library/php/class_shoppingcart.php");



$sajax_file_function = $base_sajax_dir."sajax_func.php";
include("../library/php/sajax.php");

//cart
$arr_id = "";
if (is_array($_SESSION["session_arr_cart"])){
	$session_arr_cart = $_SESSION["session_arr_cart"];
	$total = count($session_arr_cart);
	$i = 1;
	foreach ($session_arr_cart as $key=>$value){
		if($i < $total){
			$arr_id .= $key.",";
		}else{
			$arr_id .= $key;
		}
		$i++;
	}
}
//$arr_id = get_session("Pro_ID");
//echo "arr_id: $arr_id<br>";

$langid = $_GET["langid"];
$cat_id = $_GET["cat_id"];
$catid = $_GET["catid"];
$subcatid = $_GET["subcatid"];
$proid = $_GET["proid"];

$langid = getNumber($langid);
$catid = getNumber($catid);
$subcatid = getNumber($subcatid);
$proid = getNumber($proid);

if($subcatid > 0){
	$id = $subcatid;
}else{
	$id = $catid;
}

if ($langid == ""){
	$langid = 0;
}
$file_date = date("Ymd_His");

?>